﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DCTLib.Common;
using System.Data;

namespace DCTAccess.Business.TransactionLog
{
    public class Property
    {
        public Property() { }

        public Property(decimal point, int objDirect, int objRef)
        {
            this.PointNumber = point;
            this.NumMemberDirect = objDirect;
            this.NumMemberRef = objRef;
        }

        private decimal _pointNumber = 0;

        public decimal PointNumber
        {
            get { return _pointNumber; }
            set { _pointNumber = value; }
        }
        
        private int _numMemberDirect = -1;

        public int NumMemberDirect
        {
            get { return _numMemberDirect; }
            set { _numMemberDirect = value; }
        }

        private int _numMemberRef = -1;

        public int NumMemberRef
        {
            get { return _numMemberRef; }
            set { _numMemberRef = value; }
        }

        public Property(DataRow dtProperty)
        {
            this.PointNumber = Convert.ToDecimal(dtProperty["PointNumber"].ToString());
            this.NumMemberDirect = Convert.ToInt32(dtProperty["NumDirect"].ToString());
            this.NumMemberRef = Convert.ToInt32(dtProperty["NumRef"].ToString());
        }
    }   
}
